package com.ctshk.rpc.scenic.service;

import com.ctshk.common.dto.Result;
import com.ctshk.common.model.TokenUser;
import com.ctshk.rpc.scenic.dto.AirshowDistributorSettingDTO;
import com.ctshk.rpc.scenic.req.AirshowDistributorLoginReq;
import com.ctshk.rpc.scenic.req.AirshowDistributorSettingAddReq;
import com.ctshk.rpc.scenic.req.AirshowDistributorSettingReq;

import javax.servlet.http.HttpServletRequest;
import java.math.BigDecimal;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 谢诗宏
 * @since 2021-06-10
 */
public interface IAirshowDistributorSettingService{

    //获取所有的分销商
    Result getAllDistributorList();

    //编辑分销商配置
    Result updateDistributorSetting(AirshowDistributorSettingReq airshowDistributorSettingReq);

    //新增分销商
    Result addDistributor(AirshowDistributorSettingAddReq airshowDistributorSettingAddReq);

    //查询分销商
    Result<AirshowDistributorSettingDTO> getDistributorById(Long id);

    //查询分销商余额
    Result getDistributorBalanceById(Long id);

    //分销商登录
    Result distributorLogin(AirshowDistributorLoginReq airshowDistributorLoginReq);

    //扣减分销商余额
    Integer surplusDistributorBalance(Long id, BigDecimal amount);

    //增加分销商余额
    Integer addDistributorBalance(Long id, BigDecimal amount);

    //获取API账号
    TokenUser getAPIToken(String token);
}
